//对外暴露路由
export const constantRoute = [
    {
        name: "Login",//命名路由
        path: "/login",
        component: () => import("../views/login/index.vue"),
        meta: {
            title: "登录页",
            hidden: true,
            icon: "Plus"
        }
    },
    {
        /*登录成功后展示数据的路由*/
        name: "Layout",
        path: "/",
        component: () => import("../layout/index.vue"),
        redirect: "/home",
        meta: {
            title: "",
            hidden: false,
            icon: ""
        },
        children: [
            {
                name: "home",
                path: "/home",
                component: () => import("../views/home/index.vue"),
                meta: {
                    title: "首页",
                    hidden: true,
                    icon: "House"
                }
            }
        ]
    },
    {
        name: "404",
        path: "/404",
        component: () => import("../views/404/index.vue"),
        meta: {
            title: "404",
            hidden: true,
            icon: "Plus"
        }
    },
    {
        /*如果没用匹配上任意路由，就重定向到404*/
        name: "Any",
        path: "/:pathMatch(.*)*",
        redirect: "/404",
        meta: {
            title: "重定向",
            hidden: true,
            icon: "Plus"
        }
    },
    {
        name: "Screen",
        path: "/screen",
        component: () => import("../views/screen/index.vue"),
        meta: {
            title: "数据大屏",
            hidden: false,
            icon: "Platform"
        }
    },
    {
        name: "Acl",
        path: "/acl",
        component: () => import("../layout/index.vue"),
        redirect: "/acl/user",
        meta: {
            title: "权限管理",
            icon: "Lock",
            hidden: false
        },
        children: [
            {
                name: "User",
                path: "/acl/user",
                component: () => import("../views/acl/user/index.vue"),
                meta: {
                    title: "用户管理",
                    icon: "Lock",
                    hidden: false
                },
            },
            {
                name: "Role",
                path: "/acl/role",
                component: () => import("../views/acl/role/index.vue"),
                meta: {
                    title: "用户管理",
                    icon: "UserFilled",
                    hidden: false
                },
            },
            {
                name: "Monitor",
                path: "/acl/monitor",
                component: () => import("../views/acl/permission/index.vue"),
                meta: {
                    title: "用户管理",
                    icon: "Monitor",
                    hidden: false
                },
            },
        ],
    },
    {
        name: "Product",
        path: "/product",
        component: () => import("../layout/index.vue"),
        redirect: "/product/trademark",
        meta: {
            title: "商品管理",
            icon: "Goods",
            hidden: false,
        },
        children: [
            {
                name: "Trademark",
                path: "/product/trademark",
                component: () => import("../views/product/trademark/index.vue"),
                meta: {
                    title: "商品管理",
                    icon: "ShoppingCartFull",
                    hidden: false,
                },
            },
            {
                name: "Attr",
                path: "/product/attr",
                component: () => import("../views/product/attr/index.vue"),
                meta: {
                    title: "属性管理",
                    icon: "ChromeFilled",
                    hidden: false,
                },
            },
            {
                name: "Spu",
                path: "/product/spu",
                component: () => import("../views/product/spu/index.vue"),
                meta: {
                    title: "SPU管理",
                    icon: "Calendar",
                    hidden: false,
                },
            },
            {
                name: "Sku",
                path: "/product/sku",
                component: () => import("../views/product/sku/index.vue"),
                meta: {
                    title: "SKU管理",
                    icon: "Orange",
                    hidden: false,
                },
            },
        ]
    },
]

export const asnycRoute = [
    {
        name: "Acl",
        path: "/acl",
        component: () => import("../layout/index.vue"),
        redirect: "/acl/user",
        meta: {
            title: "权限管理",
            icon: "Lock",
            hidden: false
        },
        children: [
            {
                name: "User",
                path: "/acl/user",
                component: () => import("../views/acl/user/index.vue"),
                meta: {
                    title: "用户管理",
                    icon: "Lock",
                    hidden: false
                },
            },
            {
                name: "Role",
                path: "/acl/role",
                component: () => import("../views/acl/role/index.vue"),
                meta: {
                    title: "用户管理",
                    icon: "UserFilled",
                    hidden: false
                },
            },
            {
                name: "Monitor",
                path: "/acl/monitor",
                component: () => import("../views/acl/permission/index.vue"),
                meta: {
                    title: "用户管理",
                    icon: "Monitor",
                    hidden: false
                },
            },
        ],
    },
    {
        name: "Product",
        path: "/product",
        component: () => import("../layout/index.vue"),
        redirect: "/product/trademark",
        meta: {
            title: "商品管理",
            icon: "Goods",
            hidden: false,
        },
        children: [
            {
                name: "Trademark",
                path: "/product/trademark",
                component: () => import("../views/product/trademark/index.vue"),
                meta: {
                    title: "商品管理",
                    icon: "ShoppingCartFull",
                    hidden: false,
                },
            },
            {
                name: "Attr",
                path: "/product/attr",
                component: () => import("../views/product/attr/index.vue"),
                meta: {
                    title: "属性管理",
                    icon: "ChromeFilled",
                    hidden: false,
                },
            },
            {
                name: "Spu",
                path: "/product/spu",
                component: () => import("../views/product/spu/index.vue"),
                meta: {
                    title: "SPU管理",
                    icon: "Calendar",
                    hidden: false,
                },
            },
            {
                name: "Sku",
                path: "/product/sku",
                component: () => import("../views/product/sku/index.vue"),
                meta: {
                    title: "SKU管理",
                    icon: "Orange",
                    hidden: false,
                },
            },
        ]
    },
]